import React, { Component } from 'react'

export default class App extends Component {
  state = {
    isLiked: true
  }
  render() {
    const { isLiked } = this.state
    // 不推荐
    if (isLiked) {
      return (
        <>
          <h1>标题</h1>
          <div style={{ fontSize: 100 }}>😍</div>
        </>
      )
    } else {
      return (
        <>
          <h1>标题</h1>
          <div style={{ fontSize: 100 }}>💔</div>
        </>
      )
    }
  }
}
